using System.Collections.Generic;

namespace Subfaculty.Common.Entities
{
	public class StudyPlanSemester : BaseEntity
	{
		private StudyPlan _studyPlan;
		public StudyPlanSemester()
		{
			StudyPlanItems = new List<StudyPlanItem>();
		}

		public virtual StudyPlan StudyPlan
		{
			get { return _studyPlan; }
			set
			{
				_studyPlan = value;
				value.StudyPlanSemesters.Add(this);
			}
		}
		public virtual ICollection<StudyPlanItem> StudyPlanItems { get; set; }

		public virtual int Number { get; set; }
		public virtual int Duration { get; set; }
	}
}